package com.augurit.gzcgwsp.ssylb.web.form;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.jbpm.api.ProcessEngine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springside.modules.orm.Page;

import com.augurit.common.base.action.CrudActionSupport;
import com.augurit.common.syscode.service.ISysCodeService;
import com.augurit.gzcgwsp.rqqyjyxk.service.IYwRqQyjyxkService;
import com.augurit.gzcgwsp.rqqyjyxk.web.form.YwRqQyjyxkForm;
import com.augurit.gzcgwsp.ssylb.entity.YwRqRqssylb;
import com.augurit.gzcgwsp.ywcmn.service.IYwComQyxxService;
import com.augurit.wf.app.doccode.service.IOaDocCodeService;
import com.augurit.wf.bi.service.IWfBusTemplateService;
import com.augurit.wf.bi.service.IWfTemplateAttachmentRefService;
import com.augurit.wf.common.service.IWfService;
import com.augurit.wf.common.constant.WfConstant;
import com.augurit.wf.common.web.WfBusClientAction;
@SuppressWarnings("serial")
@Results({
	@Result(name = CrudActionSupport.RELOAD, location = "yw-rq-ssylb.action", type = "redirect"),
	@Result(name = CrudActionSupport.SUCCESS, location = "/gzcgwsp/rqqyjyxk/YwRqQyjyxk/YwRqQyjyxkpz.jsp"),
	@Result(name = WfConstant.PRINT, location = WfConstant.PRINT_JSP),
	@Result(name = CrudActionSupport.INPUT, location = "/gzcgwsp/rqqyjyxk/YwRqQyjyxk/YwRqQyjyxkpz-input.jsp"),
	@Result(name = WfConstant.MAKE_DOCUMENT, location = "/wf/client/common/make-document.jsp")
})
public class YwRqSsylbAction  extends WfBusClientAction<YwRqQyjyxkForm>{
    @Autowired
    private IWfService wfService;
	@Autowired
    private IOaDocCodeService oaDocCodeService;
    @Autowired
    private IYwComQyxxService qyxxService;
	@Autowired
	private IYwRqQyjyxkService ywRqQyjyxkService;
    @Autowired
    private ISysCodeService syscodeService;
    @Autowired
    private ProcessEngine processEngine;
    @Autowired
    private IWfBusTemplateService wfBusTemplateService;
    @Autowired
    private IWfTemplateAttachmentRefService wfTemplateAttachmentRefService;
	private YwRqQyjyxkForm form;
	private Long id;
	private Long[] checkedIds;
	private Page<YwRqQyjyxkForm> page = new Page<YwRqQyjyxkForm>(10);
	/**
	 * 设施一览表保存
	 * @return
	 */
	public String upload() throws Exception{
//		HttpServletResponse response=ServletActionContext.getResponse();
//		response.setContentType("text/html;charset=UTF-8");
//		
//		YwRqRqssylb ssylb=new YwRqRqssylb();
//		ssylb.setSsylbid(form.getSsylbid());
//		ssylb.setSsmc(form.getSsmc());
//		ssylb.setSslb(form.getSslb());
//		ssylb.setZdlb(form.getZdlb());
//		ssylb.setFzr(form.getFzr());
//		ssylb.setSsaddress(form.getSsaddress());
//		ssylb.setQyjyxkid(form.getId());
//		System.out.println(form.getZdlb()+"---------------");
//		
//		if(null!=form.getUpload()) {
//			//保存到数据库
//		}
//		ywRqQyjyxkService.saveSsylb(form);
		 return null;
	 }
	@Override
	public String wfBusSave() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String delete() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String deleteMore() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String list() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected void prepareModel() throws Exception {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String save() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public YwRqQyjyxkForm getModel() {
		// TODO Auto-generated method stub
		return null;
	}
	public IWfService getWfService() {
		return wfService;
	}
	public void setWfService(IWfService wfService) {
		this.wfService = wfService;
	}
	public IOaDocCodeService getOaDocCodeService() {
		return oaDocCodeService;
	}
	public void setOaDocCodeService(IOaDocCodeService oaDocCodeService) {
		this.oaDocCodeService = oaDocCodeService;
	}
	public IYwComQyxxService getQyxxService() {
		return qyxxService;
	}
	public void setQyxxService(IYwComQyxxService qyxxService) {
		this.qyxxService = qyxxService;
	}
	public IYwRqQyjyxkService getYwRqQyjyxkService() {
		return ywRqQyjyxkService;
	}
	public void setYwRqQyjyxkService(IYwRqQyjyxkService ywRqQyjyxkService) {
		this.ywRqQyjyxkService = ywRqQyjyxkService;
	}
	public ISysCodeService getSyscodeService() {
		return syscodeService;
	}
	public void setSyscodeService(ISysCodeService syscodeService) {
		this.syscodeService = syscodeService;
	}
	public ProcessEngine getProcessEngine() {
		return processEngine;
	}
	public void setProcessEngine(ProcessEngine processEngine) {
		this.processEngine = processEngine;
	}
	public IWfBusTemplateService getWfBusTemplateService() {
		return wfBusTemplateService;
	}
	public void setWfBusTemplateService(IWfBusTemplateService wfBusTemplateService) {
		this.wfBusTemplateService = wfBusTemplateService;
	}
	public IWfTemplateAttachmentRefService getWfTemplateAttachmentRefService() {
		return wfTemplateAttachmentRefService;
	}
	public void setWfTemplateAttachmentRefService(
			IWfTemplateAttachmentRefService wfTemplateAttachmentRefService) {
		this.wfTemplateAttachmentRefService = wfTemplateAttachmentRefService;
	}
	public YwRqQyjyxkForm getForm() {
		return form;
	}
	public void setForm(YwRqQyjyxkForm form) {
		this.form = form;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long[] getCheckedIds() {
		return checkedIds;
	}
	public void setCheckedIds(Long[] checkedIds) {
		this.checkedIds = checkedIds;
	}
	public Page<YwRqQyjyxkForm> getPage() {
		return page;
	}
	public void setPage(Page<YwRqQyjyxkForm> page) {
		this.page = page;
	}
	
}
